import axios from './api' // 倒入 api
import config from './config.js' // 倒入默认配置
export const BASEURL = config.baseURL

/* 将所有接口统一起来便于维护
 * 如果项目很大可以将 url 独立成文件，接口分成不同的模块
 */

// 新增反馈
export const ADD_OFEEDBACK_INFO = (params) => {
    return axios({
        url: 'ofeedback/add',
        method: 'POST',
        data: params,
    })
}

// 编辑反馈
export const EDIT_OFEEDBACK_INFO = (params) => {
    return axios({
        url: 'ofeedback/edit',
        method: 'POST',
        data: params,
    })
}

// 预约-反馈记录-获取反馈详情
export const GET_OFEEDBACK_INFO = params => {
    return axios({
        url: 'ofeedback/info',
        method: 'GET',
        params,
    })
}

// 预约-医院反馈-获取医院反馈详情
export const GET_OFEEDBACK_ORDERINFO = params => {
    return axios({
        url: 'ofeedback/order/info',
        method: 'GET',
        params,
    })
}

// 预约-所有预约
export const GET_OFEEDBACK_ORDERSEARCH = params => {
    return axios({
        url: 'ofeedback/order/search',
        method: 'GET',
        params,
    })
}


// 预约-医院反馈-获取反馈列表
export const GET_OFEEDBACK_SEARCH = params => {
    return axios({
        url: 'ofeedback/order/search',
        method: 'GET',
        params,
    })
}

// 预约-反馈记录-获取列表
export const GET_OFEEDBACK_RECORD = params => {
    return axios({
        url: 'ofeedback/search',
        method: 'GET',
        params,
    })
}

// 预约-反馈记录-获取列表-导出excel
export const GET_OFEEDBACK_EXPORT = BASEURL + 'ofeedback/export'


// 预约-反馈-获取历史反馈
export const GET_OFEEDBACK_HISTORY = params => {
    return axios({
        url: 'ofeedback/history',
        method: 'GET',
        params,
    })
}

// 预约-反馈-模糊搜索客户
export const GET_OFEEDBACK_ORDER = params => {
    return axios({
        url: 'order/orderOptions',
        method: 'GET',
        params,
    })
}

// 预约-反馈-修改客户姓名电话
export const MODIFY_CUSTOMER_INFO = params => {
    return axios({
        url: 'customer/modifyInfo',
        method: 'POST',
        data: params,
    })
}